import request from '@/utils/request'
import { getToken } from '@/utils/auth'

export function login(mobile, password) {
  return request({
    url: '/login',
    method: 'post',
    data: {
      mobile,
      password,
    }
  })
}

//手机验证码登录
export function smsCodeLogin(mobile,smsCode) {
  return request({
    url:'/userAuth/smsCodeLogin',
    method: 'post',
    data: {
      mobile,
      smsCode,
      apiId:'ADMINWEB',
    }
  })
}

export function getUserInfo() {
  return request({
    url:'/subscriber',
    method: 'post',
  })
}

//发送验证码
export function sendLoginSMSCode(data) {
  return request({
    url:'/userAuth/sendLoginSMSCode',
    method: 'post',
    data
  })
}

//发送验证码
export function sendFindPasswordSMSCode(data) {
  return request({
    url:'/sendCode',
    method: 'post',
    data
  })
}

//登出
export function logout(data) {
  return request({
    url:'/logout',
    method: 'post',
    data
  })
}

//忘记密码
export function smsFindPassword(data) {
  return request({
    url:'/retrieve/password',
    method: 'post',
    data
  })
}






